#include <stdio.h>

int Isuglynumber(int i) {
	if (i == 2 || i == 3 || i == 5)
		return 1;
	else {
		int j = i;
		while (1) {
			if (j % 2 == 0)
				j = j / 2;
			else if (j % 3 == 0)
				j = j / 3;
			else if (j % 5 == 0)
				j = j / 5;
			else
				return 0;
			if (j == 2 || j == 3 || j == 5)
				return 1;
		}
	}
}



int main() {
	int k = 0;
	scanf("%d", &k);
	int index = Isuglynumber(k);
	if (index != 0) {
		printf("YES");
	} else {
		printf("NO");
	}
}
